// GoogleApi.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

#include <windows.h>

#include "inc/google_auth.h"
#include <atlconv.h>

#include <string>
using std::string;

int _tmain(int argc, _TCHAR* argv[])
{
	USES_CONVERSION;

	WCHAR szFileName[MAX_PATH] = {};
	GetModuleFileName(NULL, szFileName, MAX_PATH);
	PathAppend(szFileName, L"../settings.ini");

	WCHAR szPassword[MAX_PATH] = {};
	GetPrivateProfileString(L"settings", L"password", L"", szPassword, MAX_PATH, szFileName);

	GoogleAuth googleAuth;
	googleAuth.SetService("finance");
	googleAuth.Login("healer.kx.yu@gmail.com", (LPCSTR)CW2A(szPassword));
	return 0;
}

